home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
MERGIT21.ARJ
/
TUTOR.TXT
< prev
next >
Wrap
Text File
|
1992-02-18
|
26KB
|
438 lines
TUTOR FOR MERGEIT
We will use the image files eschrB1.pcx and eschrB2.pcx. The initial values
file eschrB.ini makes use of the automatic merging process. The file
eschr-01.ini trims off the reference blocks from the image margins and is
used for the manual merging examples.
Start the program from the directory where it is located, with the
command=> Mergeit /eschrB.ini OR Mergeit /eschr-01.ini
Sequence of program operations:
a) Read initial values file, read beginning of lst image.
b) Check disk space for required space for output file.
c) Analyze top edge of first image for black reference blocks
c) Calculate image cutting values, check against first image size available.
d) Analyze top edge of second image for black reference blocks
e) Calculate image cutting values, check against second image size available.
f) Determine RAM space required to rotate image when merging.
If space is available, prompt user if they want to rotate and merge.
If not enough RAM is available, prompt user if they want to cut the
image shorter,use diskspace to store intermediate image file, or
not rotate at all before merging.
The popular Escher print we will use for the tutorial was scanned in at 200DPI
with the print in the landscape orientation. The right half was scanned first,
as is the convention for MergeIt. Normally we would merge the scans together
without rotation, but for tutorial purposes, we'll work with it both ways.
When rotated, the right side of the image will be on top, the top of the print
will be on the left side. To do an unrotated trim tutorial, answer "N" until
you are prompted to approve of an unrotated merge.
Normally you would use automatic trimming to eliminate tedious user
adjustments. The first two tutorials are done without this assistance for
instructional purposes. The next two tutorials show the usefulness of
automatic trimming.
The last two tutorials do manual merging of the same images and utilize
automatic trimming.
You will probably find it helpful to print out the two pcx image files to
get oriented to how MergeIt works before doing the trimming. Normally you
would have the original hardcopy image to refer to.
Simple audio feedback is given during the user trim process while viewing the
merged image region:
A simple beep indicates the start of a secondary input operation and menu
(insert/delete, auto trimming, etc.) which requires more input to finish.
A double beep indicates the end of a secondary menu or that the primary menu
command is complete by itself (i.e. whole image movement by cursor keys).
A triple beep, after a <cr> indicates the end of user trimming and either
the redisplay of the current viewed region or a continuation of the merge
process to the next merge image section.
A single, low pitched beep indicates an error, perhaps a trim or movement
limit has been reached.
Automatic Merging With Rotated Image Without Automatic Trimming
(The phrase "Nx" where N is a number means do the operation N times,
i.e. 3x= do it 3 times.)
Use initial values file "Eschrb.Ini". Answer yes to the question of doing a
rotated merge by pressing <cr> (i.e. <enter>). Confirm the building of a
composite image with the specified height by pressing <cr> again.
The right most 100 lines of the unrotated image will be shown as the top of
the rotated image. The most useful trim at this point might be to add/delete a
few lines from the top of the image. Press <up> cursor key 3x, a double beep
will follow each entry (indicating a complete user operation). Press "enter"
(<cr>) to see the effect on the image. Wait for a single beep which signals
the end of image redisplay process. To undo this change, press <down> cursor
key 3x followed by <cr> to see the results. To accept this image without
further change, and continue the merge process, press <cr>.
The screen will revert to text mode, describing the merge process: how
many lines must be merged in total and how many are in this current scanned
image section.
When a multiple of 128 lines are finished, this will be displayed until the
final (left most) 100 lines of this scanned image section are reached. If
you press <cr> at this time, when the next 128 lines are finished, the process
will pause and a short menu will be displayed. You may quit the program or
continue the process at this time. To continue press 'V' or <cr>.
Finally, the screen will return to a graphic mode and the last 100 lines of
the image will be shown. This display process ends with a single beep as
before. At this point you have 2 useful operations: trim the bottom edge up or
down, or change the view region to a more critical section.
Set the image movement step to 4 by pressing "4". Note the change in the
"triangle=4" in the top line of the menu. Press the <down> cursor key 1x (2
beeps). Press <cr> to see additional 4 image lines at the merge boundary. Set
the movement step to 1. You may repeat this <down> input 3x more, after that
you will hear a lower pitched, longer beep when you press the <down> key, this
signifies the edge of available image to view and merge. Press <cr> to see the
modifications. You may note that the last lines showed the image masked off by
a paper guide I had placed at the edge of the printed image when I scanned.
Set the movement step to 5. Press the <up> cursor key 1x to remove most of the
extra image lines, then press <cr> to see modifications . (We'll leave a few
extra lines here for tutorial purposes.) To finally accept the viewed image,
press <cr> without making any more changes.
A small merge edge marker will appear in the center of the screen, denoting
the boundary between this and the next scanned section. A few seconds will
pass while the next image section is processed. Soon the right most 100
vertical lines (before rotation) of the next image section will be shown
as the top 100 lines of the rotated image.
The right view shows a little too much the redundant image at the merge. At
this point we can ONLY trim the new image, i.e. only the image below the
marker. Set the movement step to 1. Press the <up> key 1x to move the image
up. Press <cr> to see the modification.
The left view shows some left-right misalignment. Before doing modifications,
lets shift the left view to the left edge (beginning) of the image. Press
<Alt-V> to bring the alter view menu up. Select the left region by <Home>.
Move it to the left with <Home>. Press <cr> to see the new region. Clearly we
need to move the whole lower image left. Set the movement step to 4. Press the
<left> cursor key 1x. Press <cr> to see the effects.
While the left black image border is well aligned, we could improve the
alignment of the ribbon-like detail 1 1/2" from the left edge with an
insertion. Press <Insert>, then move the marker left with the <Home> key 7x.
Note that if you press this key once more, you get the error beep since you
are at the movement limit. Press the <spacebar> 6x to move the marker 48
pixels to the right (8 pixels at a time). Press '+' to insert one line. Press
<cr> to return to the general menu. Press <cr> to see the change.
The curved black line 3 1/2" from the left display edge (on a 14" screen) is
misaligned. Press <Delete> followed by the <Home> key 6x. Use the <spacebar>
9x to place the marker in the best position (i.e. least noticeable) and press
'+' 3x. End this menu and see the changes with <cr> 2x.
The right view shows some misalignment. Bring up the insert process with
the <Insert> key. Press <Home> 3x. The marker will sit in the middle of the
screen, between the two view regions. Press the <spacebar> 8x to move the
marker into the right view region. Press '+' 1x. Move the marker a little
further right with the <spacebar> 4x. Press '+' 1x. End the insert process
with <cr> and see the changes with another <cr>. Accept this image with a
final <cr>.
The screen will revert to text mode again and messages about the merge process
will be displayed The final screen is the left edge of the second image (the
bottom edge of the rotated image). The views are of the opposite corners,
which is the result of what we selected before. While there are no more images
to merge with this edge, you may trim this edge up/down with the <up>/<down>
cursor keys. The limit in the down direction depends on how the image was
scanned and cut; there may be up to 16 extra lines. In this case, there are
less than 6 extra lines.
Set the movement step to 1. If you attempt to press the <down> key more than
5x a single low beep will signal the end of the image available to work with.
After making any changes and viewing the modifications, a <cr> without
additional trimming will signal the finishing of the merge process and return
you to DOS.
Automatic Merging With UnRotated Image Without Automatic Trimming
Use initial values file "Eschrb.Ini". Answer no to the question of doing a
rotated merge by pressing 'N'. Answer yes to the question of doing an
unrotated merge by pressing <cr>.
There is only one merge region, which is shown on the right half of the
screen. The left side of the screen only shows the left edge of the image
which is not trimable. With a three or more piece merge process, two merge
regions are shown at a time, both trimable.
The first 200 lines of the merged image is shown.
Note the small region marker which looks somewhat like: "___ __ _" The solid
side points to the merge region and indicates the image to the right of the
merge is currently selected for trimming.
This region is a little high. Set the movement step size to 5 by pressing "5".
Press the <down> cursor key 1x, a double beep
will follow each entry. Press <cr> to see the shifted region and merge (a
triple beep indicates the trimming process is over- the merge process will
either continue or the current viewed region will be redone).
When the modified image is fully displayed, a single beep will sound,
prompting you be more input. We overcompensated in our shift according to the
top black/white border. Set the movement step to 1. Press the <up> cursor key
1x (but do NOT press <cr> yet). Note that the region to the right of the merge
is lower than the left by 2 or 3 lines in the center portion. We can delete 2
lines above this region and below the top border. Press the <delete> key (1
beep will follow). The image line to be modified will appear as inverted video
on the screen. Note that the inverse video effect does NOT run all the way to
the actual boundary between scanned image sections. The marked line is
initially 1 line below the last displayed image line. We can move this line
marker up/down 20 lines at a time with the <pg up>/<pg dn> keys. You may move
the marker 1 line down with the space bar, 1 line up with the <backspace> key.
Since the marker visually moves, no audio feedback is given. Press the <pg up>
key 6x. To delete at the marked line, press the '+' key (1 beep will follow).
To delete another line and end this deletion operation, press '+' followed by
<cr> (2 beeps will found to indicate the end of this operation). Press <cr>
again to see the modifications (3 beeps will follow).
After hearing 1 beep which signals the end of the redisplay process,
press <cr> to accept the image and continue merging.
The next 200 lines will be displayed.
The image to the left of the merge is a little below the image on the right.
We could add a few lines on the right side, but for practice let us delete 2
lines in the left image. First select that image by pressing the <home> key
1x. The region marker will move to the left side of the merge (followed by a
double beep). Then start the delete operation by pressing the <delete> key (1
beep will follow) and the marked line will appear at the bottom of the
selected image. The line marker can be moved up/down 20 lines at a time with
the <pg up>/<pg dn> keys. Press the <pg up> key 9x, followed by a '+' to
delete 1 line (1 beep). Then press '+' and <cr> to delete a second line and
end the delete operation (2 beeps).
To see the effects of this operation, press <cr> (3 beeps-trimming input
ended, image redisplayed).
When the display is finished, a single beep will sound and the region marker
will appear below the right side of the merge.
To accept this merge region and continue the process, press <cr> (3 beeps).
The next 200 lines will be displayed. While this region looks OK as is, since
this is a tutorial, lets modify it anyway by moving the image on the right
into the merge with the <left> cursor key. Press this key 2x (2 beeps will
occur with each entry).
Press <cr> to see the modified image.
Perhaps the return to the beginning image view surprised you? Since you moved
the whole right image left, the whole merged image file had to be rebuilt.
To accept this merged region, press <cr>.
After the second display is finished, lets undo the previous operation, move
the right image away from the merge. Press the <right> cursor key 2x (2 beeps
with each entry). This time, to speed up the rebuild process and avoid viewing
the previous image, enter 'B' (build the image again w/o view until the
current image) (2 beeps will follow).
Then press <cr> to do the rebuilding and redisplay the current merge
section.
While you're waiting for the rebuilding, perhaps you realize it is expedient
to do any whole scanned image motion early on in the merge process. If the
original image scanning is done with a rigid left guide edge, whole scanned
section motion is seldom required after the initial displayed 200 lines.
Typically, only line insert/delete trimming is required which may be
performed automatically.
The screen will revert to text mode and the building of the previous
200 lines will begin. Progress of the merge will be displayed by messages
every 128 and 200 lines. Then the screen will return to graphics and the
current modified merge region will be displayed.
Press <cr> to accept this region and the next ones until you get near the
bottom edge of the image when the black border of the right image will be
lower than the border of the left. To delete 3 lines in the right image, press
<delete> (1 beep) followed by <pg up> 9x. The marked line will move near the
top of the viewed region. Enter '+' 3x, followed by <cr> to perform 3
deletions and end the deletion process (2 beeps).
Finally, lets insert a line in the left image. First, press <home> to select
the left image. Then press <insert>, followed by <pg up> 4x. Press '+' and <cr>
to perform 1 insert and end the insert process.
Press <cr> to see all the modifications.
Press <cr> to accept region.
Most of screen will go black, followed by a few remaining white lines at
top. Press <cr> to accept these and finish merge.
Automatic Merging With UnRotated Image With Automatic Trimming
Use initial values file "Eschrb.Ini". Answer no to the question of doing a
rotated merge by pressing 'N'. Answer yes to the question of doing an
unrotated merge by pressing <cr>.
There is only one merge region, which is shown on the right half of the
screen. The left side of the screen only shows the left edge of the image
which is not trimable. With a three or more piece merge process, two merge
regions are shown at a time, both trimable.
The first 200 lines of the merged image is shown. The top black edge on
the left image is too low. Select the left image with the <Home> key.
Set the image movement step size to 4 by pressing "4".
Move this image up 4 lines by pressing the <up> cursor key 1x. End user input
with <cr>.
The merged image will be rebuilt and displayed. The top edge looks good.
Since we are using automatic merging by use of the top edge reference blocks,
we can assume that image overlap is correct. (If you are merging without the
help of reference blocks, you should set the overlap correctly before turning
on auto trimming).
Now turn auto trimming on and initialize trimming in the currently viewed
region by bringing up the appropriate menu <Alt-T> and pressing "I". Press
<cr> to rebuild the merged image and display. The display will show a good
merge. As you successively build the image and view the process (by pressing
<cr>), the image will remain aligned across the boundary.
Automatic Merging With Rotated Image With Automatic Trimming
Use initial values file "Eschrb.Ini". Answer yes to the question of doing a
rotated merge by pressing <cr>. Confirm the building of a composite image
with the specified height by pressing <cr> again.
The right most 100 lines of the unrotated image will be shown as the top of
the rotated image. Press <cr> to pass to the bottom edge of the 1st rotated
image. We want to shift the left half of the displayed regions to the left
edge of the rotated image. Enter <Alt-V> to bring up the alter view menu.
Press <Home> to select the left view to shift. Press <Home> to shift this view
to the left. Press <cr> to see the new view (of the left edge). Press <cr> to
see the top of the next image. We need to move this new image left 4x. Set the
movement step size to 4 by pressing "4". Press <left> cursor key 1x followed
by <cr> to see the result.
The left edge looks good but there is clearly some misalignment as the image
moves to the right. Turn auto trimming on and initialize the process in the
current region by going into the auto trim menu with <Alt-T> and then pressing
"I". The status line will show that the auto trimming process is ON and that
if we redo the currently displayed image, auto trimming will process the
boundary region. Press <cr> to see the results.
Alignment will improve and we can continue the merge process by pressing <cr>.
When the final bottom edge is shown, press <cr> to finish the merging.
Manual Merging With Rotated Image With Automatic Trimming
Use the initial values file 'Eschr-01.Ini'. Answer yes to the question of
doing a rotated merge by pressing <cr>. Confirm the building of a composite
image with the specified height by pressing <cr> again.
When viewing the top 1st image region, move the view to the beginning edge of
the scanned section (which is now on the left side). We accomplish this by
changing the view of the left displayed region to the left edge of the image.
Press <Alt-V> for the alter view menu. Select the left region with <Home> and
move the view to the left with <Home>. Press <cr> to see the new view. Press
<cr> to accept the image. The screen will revert to text mode as the middle
section of this image is built. The final 100 lines of this 1st image will
then be displayed. Press <cr> to accept the bottom edge of the 1st rotated
scanned image section.
The top of the 2nd image needs to be moved up. Set the movement step size to 4
lines at a time by pressing "4". Press <up> cursor key 3x. Press <cr> to see
modification. Some left movement is necessary. Set movement step size to 1 by
pressing "1". Press <Left> cursor key 2x. Press <cr> to see modification. We
are close to alignment. Do final alignment by pressing <Left> cursor key 1x
and <up> cursor key 1x. Press <cr> to see modification. While alignment is
good, we can turn on automatic trimming to perfect the merging. Press <Alt T>
to bring up automatic trimming menu. Press "I" to initiate an auto trimming.
Press <cr> to see results of trimming.
Accept this new merge with <cr>. When the bottom of the image is displayed,
accept this with a final <cr>.
Manual Merging With UnRotated Image With Automatic Trimming
Use initial values file "Eschr-01.Ini". Answer no to the question of doing a
rotated merge by pressing 'N'. Answer yes to the question of doing an
unrotated merge by pressing <cr>.
The left side of the merged region (which is shown on the right side of the
screen) is too low. Select this region with <Home>. Set the movement size to 4
lines at a time by pressing to "4". Press <up> cursor key 2x. See the adjusted
image by pressing <cr>. The left region needs a little more movement up.
Select this region with the <Home> key. Set the movement size to 1 by
pressing "1". Move the region up by pressing the <up> key 2x. Press <cr> to
see the results. The misalignment of the light, slanted ribbon-like detail
indicates that there is too much redundant image at the boundary. Set the
movement size to 4. We will move both regions closer together. Move the right
region to the left by pressing the <Left> cursor key. Select the left region
by pressing <Home>. Move this region to the other one by pressing the <Right>
cursor key. Press <cr> to see the results. Regions need to be a little closer
together. Set movement size to 1. Move the right region to the left by
pressing <Left> cursor key 2x. Press <cr> to see results. Alignment is not too
bad. Initialize the automatic trim process to improve the merge by pressing
<Alt T> followed by "I". Press <cr> to see results of auto trimming. Accept
the merge with <cr>. The subsequent merge regions will stay in alignment thru
the auto trim process. Accept each region with <cr>. (The last displayed
region will be a small white area.)
Examining Reference Block Image Analysis
This is an optional part of the tutorial, hopefully you won't need to peek
into the details of image analysis for determining the black reference
blocks. If you are curious, then make a copy of the initial values file
"EschrB.Ini" to "EschrBB.Ini" (or whatever name you want). Then edit it
with an ascii text editor, changing the 3rd number on the 4th line from
0 to 1000. This will cause each image line that is analyzed for reference
block determination to be displayed for 1000 millisecs (1 second).
Restart MergeIt with the new initial values file.
Once a line's analysis is displayed, pressing <cr> will hold this display.
Otherwise the next line will be shown after a pause of 1000 millisecs. Restart
the merge program with the edited initial values file. As soon as the first
line analysis is shown, press <cr> to hold this screen.
At the top of the screen is the index of the line being shown and the label
for the following 5 lines of image information: Left Side. To determine the
location of the reference blocks, about 1.5" of the image line is analyzed
starting at the left and right edges. These 5 lines display each image dot as
a 0 (=black) or 1 (=white). They are arranged with 70 values/line divided into
groups of 10 separated by ",". The inverse video dot values indicates the
beginning and end of the reference block as determined by the program for that
line. (Note that both line indices and dot indices start at 0).
Below this line data is a summary of reference block information. "Left
Blk Ht/Bot=" refers to the height of the left reference block at this point in
the analysis and the line index of the bottom of the reference block. At this
point, the height of the block is only 1 and no bottom has been reached
(index=0). Similar information is displayed for the right reference block.
The next couple of lines display the dot indices on this line for the
reference block start dots and the block width in dots. Note that for both the
left and right blocks, the start dot is for the block's left side.
The last line is a help line for user input:
<cr>: the analysis will simply continue.
"F" : the line by line display will continue but will pause for 1/4 of the
present pause time.
"S" : the line by line display will continue but will pause for 4x the
present pause time.
"B" : the line by line display will be terminated, only the summary of analysis
for each image will be shown.
Continue viewing the line analysis until line index 31.
This line determines the bottom of the left reference block. The black line
segment is too short. Note that the left block bottom is now shown to be
at line index 30 (the previous line). The start and width dot information
for the left block on this line is replaced with the phrase "L Blk defined".
In the continuing line analysis for the right reference block, no more
analysis will be done on the left reference block.
Continue viewing the line analysis until line index 36.
This line determines the bottom of the right reference block. Line analysis
will stop at this point.
A summary of the analysis will follow, showing 15 lines of reference block
information at a time. The dot indices for edge and width will be listed for
the left and right reference blocks. Press <cr> to see the next 15 lines of
information. The main thing to look for is the stable reference block location
and size for each line. The last line or two may be off
After all lines are shown, average values for these dot indices will be
displayed.
Finally, calculated image cut parameters will be listed, again by dot indices,
for the X and Y dimensions.
For each dimension, the cut indices are listed first, separated by "..".
The last value is the size of the original scanned image. If a calculated
cut parameter is beyond the image size, it will be flagged with a large value
typically >60000.
The last line is a help line for user input. Similar to above, you have the
choice of faster (F), slower (S), or continue (<cr>).
Press <cr> and as soon as a line's analysis appears, press <cr> again. Then
press "B" to bypass continued line by line displays. Only the final summary
will be shown. To not do the actual image merging, answer the questions about
how to merge with "N".